<?php 
include($_SERVER['DOCUMENT_ROOT']."/BD.php");
include($_SERVER['DOCUMENT_ROOT']."/constantesfb.php");
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="es" xml:lang="es">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>&iexcl;Oferto Ya!</title>
    <meta name="keywords" content="subastas" />
    <meta name="description" content="Subastas al peso" />
    <!-- jQuery -->
    <script src="/jquery/jquery.js" type="text/javascript"></script>
    <script src="/jquery/jquery.kwicks-1.5.1.pack.js" type="text/javascript"></script>
    <link href="/jquery/css/jquery-ui-1.8.17.custom.css" rel="stylesheet" type="text/css"/>
    <script src="/jquery/jquery-ui-1.8.17.custom.min.js"></script>
    <!-- Nuestro -->
    <link href="https://fonts.googleapis.com/css?family=Droid+Sans:400,700" rel="stylesheet" type="text/css">
    <link href="/css/estilos-v1-min.css" rel="stylesheet" type="text/css" />
    <link href="/css/estilos-formulario-v1-min.css" rel="stylesheet" type="text/css" />
    <script src="/scripts/funciones-v1-min.js" type="text/javascript"></script>
    <script src="/scripts/jquery-pop-v1-min.js" type="text/javascript"></script>
	<script src="/jquery/slides.min.jquery.js" type="text/javascript"></script>
    <!-- Spry -->
    <script src="/spry/validacionPasswordField-min.js" type="text/javascript"></script>
    <script src="/spry/validacionTextField-min.js" type="text/javascript"></script>
	<script src="/spry/validacionRadioButton-min.js" type="text/javascript"></script>
    <script src="/spry/validacionValidateField-min.js" type="text/javascript"></script>
	<script src="/spry/validacionCheckbox-min.js" type="text/javascript"></script>
    <link href="/spry/SpryMenuBarHorizontal-min.css" rel="stylesheet" type="text/css" />
	<script src="/spry/SpryMenuBar-min.js" type="text/javascript"></script>
    <!-- FB -->
    <?php echo("<script src=\"https://connect.facebook.net/es_LA/all.js#appId=" . FACEBOOK_APP_ID . "&xfbml=1\"></script>");?>
</head>
  <body>
    <div id="fb-root"></div>
    <div id="facebook-like" >
      <div id="facebook-like-img">
        <div id="fb-link">
          <p><a href="#">S&iacute;guenos</a></p>
        </div>
        <div id="fb-likes">
		  <?php
			//Boton Me gusta relacionado a la pagina en la que se encuentre  
			$url = 'https://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
			echo "<fb:like href=\"$url\" send=\"false\" layout=\"box_count\" width=\"73\" show-faces=\"false\" font=\"arial\"></fb:like>";
		  ?>
        </div>
      </div>
    </div>
    <div id="twitter-follow" >
      <div id="twitter-follow-img">
        <div id="twt-link">
          <p><a href="#">S&iacute;guenos</a></p>
        </div>
        <div id="twt-follows">
		  <?php
			//Boton de twitter relacionado a la pagina en la que se encuentre
			$url = 'https://'. $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
			echo "<a href=\"$url\" class=\"twitter-share-button\" data-count=\"vertical\" data-lang=\"es\">Tweet</a>
				  <script type=\"text/javascript\" src=\"https://platform.twitter.com/widgets.js\"></script>";
		  ?>
        </div>
      </div>
    </div>
    <div id="wrapper">
      <div id="header">
        <div id="logo">
          <a href="/">
            <img class="img_no_border" name="logo" src="/css/imagenes/logo.png" width="249" height="65" alt=""/>
          </a>
        </div>
        <div id="login">	
        <?php    
              if (isset($_COOKIE["OfertoYa"]))
              {
                  $info = explode("---",$_COOKIE["OfertoYa"]);
                  $seud = traducir($info[0]);
                  echo "<table width=\"490\" border=\"0\">
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <td>&nbsp;</td>
                          </tr>
                          <tr>
                            <td width=\"50\">&nbsp;</td>
                            <td width=\"250\">
                              <h2>&iexcl;Hola, $seud!</h2>
                            </td>
                            <td width=\"190\">
                              <form id=\"form_login\" method=\"post\" action=\"/logout.php\">
                                <input class=\"boton\" type=\"submit\" value=\"Cerrar sesi&oacute;n\">
                              </form>
                            </td>
                          </tr>
                        </table>";
              } else {
                echo "<form id=\"form_login\" method=\"post\" action=\"/login.php\">";  
                echo "<table width=\"490\" border=\"0\" >";
                echo "<tr>";
                echo "<td>";
                echo "<label for=\"ingresoCorreo\">Correo:&nbsp;</label>";
                echo "</td>";
                echo "<td>";
                echo "<label for=\"ingresoContrasena\">Contrase&ntilde;a:&nbsp;</label>";
                echo "</td>";
                echo "</tr>";
                echo "<tr>";
                echo "<td>"; 
                echo "<span id=\"ingresoCorreo\">";
                echo "<input type=\"text\" name=\"ingresoCorreo\" id=\"ingresoCorreo\" />";
                echo "<span class=\"textfieldRequiredMsg\"></span><span class=\"textfieldInvalidFormatMsg\"></span></span>";
                echo "</td>";
                echo "<td>";
                echo "<span id=\"ingresoContrasena\">";
                echo "<input type=\"password\" name=\"ingresoContrasena\" id=\"ingresoContrasena\" />";
                echo "<span class=\"passwordRequiredMsg\"></span></span>";
                echo "</td>";
                echo "<td>";
                echo "<input class=\"boton\" value=\"Ingresar\" type=\"submit\"/>";
                echo "</td>";
                echo "</tr>";
                echo "</table>";
                echo "<table class=\"header_letra_pequena\" width=\"490\" border=\"0\">
                        <tr>
                          <td width=\"196\"><input id=\"check_no_cerrar_sesion\" name=\"check_no_cerrar_sesion\" type=\"checkbox\" value=\"1\" />
                            <label for=\"check_no_cerrar_sesion\">No cerrar sesi&oacute;n</label>
                          </td>
                          <td width=\"294\"><a href=\"/restablecercontrasena.php\">Olvid&eacute; mi contrase&ntilde;a</a>
                          </td>
                        </tr>
                      </table>";  	
                echo "</form>";
              }
        ?>
        </div>
        
        <div id="navegacion">  
          <ul id="barraNavegacion" class="MenuBarHorizontal">
            <li><a class="MenuBarItemSubmenu" href="#">Subastas</a>
              <ul>
                <li><a href="#">Actuales</a></li>
                <li><a href="#">Por venir</a></li>
                <li><a href="#">Finalizadas</a></li>
              </ul>
            </li>
            <li><a href="#" class="MenuBarItemSubmenu">Productos</a>
              <ul>
                <li><a href="#">Categoria1</a></li>
              </ul>
            </li>
            <li><a href="/funcionamiento.php">C&oacute;mo funciona</a>            </li>
            <li><a href="/faq.php">FAQ</a></li>
            <li><a href="/inscripcion.php">Inscr&iacute;bete</a></li>
          </ul>
        </div>
      </div>
    <script type="text/javascript">
      var barraNavegacion = new Spry.Widget.MenuBar("barraNavegacion", {imgDown:"/spry/SpryMenuBarDownHover.gif", imgRight:"/spry/SpryMenuBarRightHover.gif"});
      var ingresoCorreo = new Spry.Widget.ValidationTextField("ingresoCorreo", "email");
      var ingresoContrasena = new Spry.Widget.ValidationPassword("ingresoContrasena");
    </script>